package tieba.task;

import java.util.List;

import javax.annotation.Resource;

import tieba.entity.TbSignTask;
import tieba.service.ITbSignTaskService;
import tieba.sign.execute.SignAction;

public class SpringQtzJob {

	@Resource
	private ITbSignTaskService tbSignTaskService;

	public void execute() {
		System.out.println("执行任务");
		List<TbSignTask> tasks = null;
		int pageNum = 1;
		int pageSize = 15;
		do {
			System.out.println("第" + pageNum + "页");
			tasks = tbSignTaskService.getList(pageNum, pageSize, null, null);
			new SignAction(tasks,tbSignTaskService).execute();
			pageNum++;
		} while (tasks.size() == pageSize);
	}
}
